/*
 * Ch 5.2
 */
import java.lang.*;
class DecimalToBin {
	DecimalToBin(){
		
	}
	
	public static String printBin(String n) {
		int intPart = 0;
		double decPart = 0.0;
		
		if(n.indexOf('.') != -1){ 
			intPart = Integer.parseInt(n.substring(0, n.indexOf('.')));
			decPart = Double.parseDouble(n.substring(n.indexOf('.'), n.length()));
		} else { // if integer
			intPart = Integer.parseInt(n);
		}
		String int_string = "";
		
		while( intPart > 0 ) {
			int r = intPart % 2;
			intPart >>= 1; // intPart /=2;
			int_string = r + int_string;
		}
		
		StringBuffer dec_sb = new StringBuffer(); //stringbuffer for decimal part
		while( decPart > 0 ){
			if( dec_sb.length() > 32 ) return "ERROR";			
			if( decPart == 1 ) { // necessary?
				dec_sb.append(decPart);
				break;
			}
			double r = decPart * 2;
			if ( r >= 1 ){
				dec_sb.append(1);
				decPart = r - 1;
			} else{
				dec_sb.append(0);
				decPart = r;
			}
		}
		int_string = int_string + "." + dec_sb.toString();
		return int_string;
	}
		
	public static void main(String[] args){
		System.out.println(printBin("20.375"));
	}
	
}